package com.hzhq.contract.bean.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

/**
 * @author hzhq
 * @create 2021/4/7 5:15 下午
 * @email hzhq1255@163.com
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "depart")
public class Depart {

    public static final String DEPART_ID_FIELD = "_id";
    public static final String DEPART_NAME_FIELD = "depart_name";
    public static final String DESC_FIELD = "desc";
    public static final String DELETED_FIELD = "deleted";

    @Id
    private ObjectId departId;
    @ApiModelProperty("部门")
    @Indexed
    @Field("depart_name")
    private String departName;
    @ApiModelProperty("描述")
    @Field("desc")
    private String desc;
    @ApiModelProperty("删除")
    @Field("deleted")
    private Integer deleted;

}
